<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<form id="globalAuthForm" method="post">
	<table class="form-table">
		<tr class="hidden"><td>
			<input id="authIdInput" name="dto.apiGlobalAuth.authId" />
			<input id="taskIdInput" name="dto.apiGlobalAuth.taskId" />
			<!-- <input id="paramsInput" name="dto.apiGlobalAuth.params" /> -->
		</td></tr>
		<tr>
			<td class="left_td" style="text-align:right">认证方式：</td>
			<td>
				<input id="authType" class="exui-combobox" name="dto.apiGlobalAuth.authType" style="width:270px" data-options="
					editable:false,
					valueField: 'value',
					textField: 'label',
					data: [{
						label:'基础认证',value:1
					}, {
						label:'token认证',value:2
					},{
						label:'无',value:3
					}],
					prompt:'-请选择-',
					onChange:onChange"/>
			</td>
		</tr>
		<tr class="baseAuth hidden">
			<td class="left_td" style="text-align:right">URL：</td>
			<td>
				<input id="url" class="exui-validatebox" name="dto.apiGlobalAuth.url" data-options="validType:'url'" style="width:270px" />
			</td>
		</tr>
		<tr class="baseAuth hidden">
			<td class="left_td" style="text-align:right">用户名：</td>
			<td>
				<input class="exui-textbox" name="loginKey" data-options="value:'username'" style="width:103px"/>=
				<input id="username" class="exui-textbox" name="loginVal" style="width:150px" />
			</td>
		</tr>
		<tr class="baseAuth hidden">
			<td class="left_td" style="text-align:right">密码：</td>
			<td>
				<input class="exui-textbox" name="pswKey" data-options="value:'password'" style="width:103px"/>=
				<input id="password" class="exui-passwordbox" iconWidth="28" name="pswVal" style="width:150px" />
			</td>
		</tr>
		<tr class="tokenAuth hidden">
			<td class="left_td" style="text-align:right">token参数名：</td>
			<td>
				<input id="token" class="exui-textbox" name="tokenKey" style="width:270px" />
			</td>
		</tr>
		<tr class="tokenAuth hidden">
			<td class="left_td" style="text-align:right">token：</td>
			<td>
				<input id="tokenParameterName" class="exui-textbox" name="tokenVal" style="width:270px" />
			</td>
		</tr>
		<tr>
			<td class="left_td" style="text-align:right">默认值：</td>
			<td>
				<input id="defaultVal" class="exui-switchbutton" name="dto.apiGlobalAuth.defaultVal" checked />
				<!-- <a class="exui-linkbutton" data-options="btnCls:'primary',size:'xs'" onclick="authUpdate()">更新认证</a> -->
				<button id="authUpdate" type="button" class="btn btn-default bntcss hoverBu" style="padding:2px 8px;margin-left: 56px;" onclick="authUpdateSumbit();">检验/刷新认证</button>
			</td>
		</tr>
	</table>
</form>
<div id="addOrEditFoot" align="right" >
	<a class="exui-linkbutton" data-options="btnCls:'primary',size:'xs'" onclick="save()">保存</a>
	<a class="exui-linkbutton" data-options="btnCls:'default',size:'xs'" onclick="closeWin()">取消</a>
</div>	

<script src="<%=request.getContextPath()%>/itest/js/apiManager/globalAuth/globalAuth.js" type="text/javascript" charset="utf-8"></script>